<template>
    <!--我的订单-->
    <div class="orders">
        <a class="question" v-on:click="showService()"><img src="../../assets/daochu.png" alt=""> 说明</a>
        <Tabs value="name1" @on-click="handleTabClick">
            <TabPane label="全部证书" name="name1">
                <div class="content">
                    <div class="list clearfix">
                        <ul class="clearfix">
                            <li class="list_item" v-for="item in certificateList" >
                                <div class="titles"><img src="../../assets/icon.png" alt="">《{{item.certificateName}}》</div>
                                <div class="clearfix" v-on:click="downloadCertificate(item)">
                                    <ul class="pull-left">
                                        <li>
                                            <span>持 证 人：</span>{{item.userName}}
                                        </li>
                                        <li>
                                            <span>证书编号：</span>{{item.certificateNum}}
                                        </li>
                                        <li>
                                            <span>发证机构：</span>{{item.award}}
                                        </li>
                                    </ul>
                                    <ul class="pull-right">
                                        <li>
                                            <span>发证时间：</span>{{item.awardTime}}
                                        </li>
                                        <li>
                                            <span>有效期至：</span>{{item.validity}}
                                        </li>
                                        <li>
                                            <span>登记时间：</span>{{item.djTime.substring(0,11)}}
                                        </li>
                                    </ul>
                                </div>
                                <div class="btn">
                                    <p v-if="item.isConvert == 1 && item.isexam == 1 && item.examInfo.certExamStatus == 2 && item.examInfo.cerQualified == 0"
                                       class="pull-left"><span>状态：  </span>未通过</p>
                                    <a v-if="item.isConvert == 1 && item.isexam == 1 && item.examInfo.certExamStatus == 2 && item.examInfo.cerQualified == 0"
                                       href="javascript:;" @click="showStatementInfo(item)">重新转换考试</a>
                                    <p v-if="item.isConvert == 1 && item.isexam == 1 && item.examInfo.certExamStatus == 1" class="pull-left"><span>状态：  </span>待考试</p>
                                    <a v-if="item.isConvert == 1 && item.isexam == 1 && item.examInfo.certExamStatus == 1" class="look" href="javascript:;" @click="seeDetail()" >查看考试详情>></a>
                                    <p v-if="item.isConvert == 1 && item.isexam == 1 && item.examInfo.certExamStatus == 2 && item.examInfo.cerQualified == 1"
                                       class="pull-left"><span>状态：  </span>考试合格</p>
                                    <a v-if="item.isStudy == 1" href="javascript:;" @click="continuEdu(item)">继续教育</a>
                                    <a v-if="item.isConvert == 1 && item.isexam == 2" href="javascript:;" @click="showStatementInfo(item)">转换学分考试</a>
                                    <a v-if="item.isConvert == 1 && item.isexam == 1 && (item.examInfo.certExamStatus == 3 || item.examInfo.certExamStatus == 0)"
                                       href="javascript:;" @click="showStatementInfo(item)">转换学分考试</a>
                                </div>
                                <div class="btn" v-if="item.isApply == 2">
                                    <a href="javascript:;" v-on:click="applyChange(item)">申请转换证明</a>
                                </div>
                                <div class="btn" v-if="item.isApply == 1 && item.changeInfo.auditState == 1">
                                    <p class="pull-left"><span>状态：  </span>待转换审核</p>
                                </div>
                                <div class="btn" v-if="item.isApply == 1 && item.changeInfo.auditState == 3">
                                    <p class="pull-left"><span>状态：  </span>审核不通过 <a href="javascript:;" @click="seeResult(item)" class="recuse">(查看原因)</a></p>
                                    <a href="javascript:;" v-on:click="applyChange(item)">重新申请证明</a>
                                </div>
                                <div class="btn" v-if="item.isApply == 1 && item.changeInfo.auditState == 2 && (item.creditScore == '' || item.creditScore == null)">
                                    <p class="pull-left1"><span>状态：  </span>审核通过 <a href="javascript:;" v-on:click="downloadProve(item)" class="recuse">(下载转换证明)</a></p>
                                    <p class="pull-left1"><span>证明有效期至：</span>{{item.changeInfo.validityTime.substring(0,11)}} </p>
                                </div>
                                <div class="btn" v-if="item.isApply == 1 && item.changeInfo.auditState == 2 && item.creditScore != '' && item.creditScore != null">
                                    <p class="pull-left"><span>成功转换：  </span>{{item.creditScore}}</p>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
            </TabPane>
            <TabPane label="技能等级证书" name="name2">
                <div class="content">
                    <!--========-->
                    <div class="list clearfix">
                        <ul class="clearfix">
                            <li class="list_item" v-for="item in certificateList" >
                                <div class="titles"><img src="../../assets/icon.png" alt="">《{{item.certificateName}}》</div>
                                <div class="clearfix" v-on:click="downloadCertificate(item)">
                                    <ul class="pull-left">
                                        <li>
                                            <span>持  证 人：</span>{{item.userName}}
                                        </li>
                                        <li>
                                            <span>证书编号：</span>{{item.certificateNum}}
                                        </li>
                                        <li>
                                            <span>发证机构：</span>{{item.award}}
                                        </li>
                                    </ul>
                                    <ul class="pull-right">
                                        <li>
                                            <span>发证时间：</span>{{item.awardTime}}
                                        </li>
                                        <li>
                                            <span>有效期至：</span>{{item.validity}}
                                        </li>
                                        <li>
                                            <span>登记时间：</span>{{item.djTime.substring(0,11)}}
                                        </li>
                                    </ul>
                                </div>
                                <div class="btn">
                                    <p v-if="item.isConvert == 1 && item.isexam == 1 && item.examInfo.certExamStatus == 2 && item.examInfo.cerQualified == 0"
                                       class="pull-left"><span>状态：  </span>未通过</p>
                                    <a v-if="item.isConvert == 1 && item.isexam == 1 && item.examInfo.certExamStatus == 2 && item.examInfo.cerQualified == 0"
                                       href="javascript:;" @click="showStatementInfo(item)">重新转换考试</a>
                                    <p v-if="item.isConvert == 1 && item.isexam == 1 && item.examInfo.certExamStatus == 1" class="pull-left"><span>状态：  </span>待考试</p>
                                    <a v-if="item.isConvert == 1 && item.isexam == 1 && item.examInfo.certExamStatus == 1" class="look" href="javascript:;" @click="seeDetail()" >查看考试详情>></a>
                                    <p v-if="item.isConvert == 1 && item.isexam == 1 && item.examInfo.certExamStatus == 2 && item.examInfo.cerQualified == 1"
                                       class="pull-left"><span>状态：  </span>考试合格</p>
                                    <a v-if="item.isStudy == 1" href="javascript:;" @click="continuEdu(item)">继续教育</a>
                                    <a v-if="item.isConvert == 1 && item.isexam == 2" href="javascript:;" @click="showStatementInfo(item)">转换学分考试</a>
                                </div>
                                <div class="btn" v-if="item.isApply == 2">
                                    <a href="javascript:;" v-on:click="applyChange(item)">申请转换证明</a>
                                </div>
                                <div class="btn" v-if="item.isApply == 1 && item.changeInfo.auditState == 1">
                                    <p class="pull-left"><span>状态：  </span>待转换审核</p>
                                </div>
                                <div class="btn" v-if="item.isApply == 1 && item.changeInfo.auditState == 3">
                                    <p class="pull-left"><span>状态：  </span>审核不通过 <a href="javascript:;" @click="seeResult(item)" class="recuse">(查看原因)</a></p>
                                    <a href="javascript:;" v-on:click="applyChange(item)">重新申请证明</a>
                                </div>
                                <div class="btn" v-if="item.isApply == 1 && item.changeInfo.auditState == 2 && (item.creditScore == '' || item.creditScore == null)">
                                    <p class="pull-left1"><span>状态：  </span>审核通过 <a href="javascript:;" v-on:click="downloadProve(item)" class="recuse">(下载转换证明)</a></p>
                                    <p class="pull-left1"><span>证明有效期至：</span>{{item.changeInfo.validityTime.substring(0,11)}} </p>
                                </div>
                                <div class="btn" v-if="item.isApply == 1 && item.changeInfo.auditState == 2 && item.creditScore != '' && item.creditScore != null">
                                    <p class="pull-left"><span>成功转换：  </span>{{item.creditScore}}</p>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <!--成功时-->
                    <!--<div class="success">
                        <div class="logo">
                            <img src="../../assets/success1.png" alt="">
                            <p>恭喜您，报名成功！</p>
                        </div>
                        <ul>
                            <li><span>报名项目：</span>2020年春季中级物业师考试</li>
                            <li><span>理论考试：</span>2020-05-06  10:00 - 11:30</li>
                            <li><span>案例考试：</span>2020-05-06  14:00 - 16:30</li>
                            <li><span>考试方式：</span>线上</li>
                            <li><span>考试费用：</span>￥300.00</li>
                            <li><span>考试说明：</span><router-link to="/">查看</router-link> </li>
                            <li>报名成功，短信通知已发送，请按时按参加考试。</li>
                            <li><Button size="large">返回证书列表</Button><router-link to="/ziliao/nextjiaoyu"><Button  size="large">开始继续教育</Button></router-link></li>
                        </ul>
                    </div>-->
                </div>
            </TabPane>
            <TabPane label="添加证书" name="name3" style="height: 715px;">
                <div class="content">
                    <div class="list clearfix">
                        <Form :label-width="86" label-position="left" class="formMin" :rules="formValidate" ref="form" :model="form">
                            <FormItem prop="certificateId" label="证书" style="width: 50%;">
                                <Select v-model="form.certificateId" placeholder="请选择证书" size="large">
                                    <Option :value="item.id" v-for="item in cerList">{{item.label}}</Option>
                                </Select>
                            </FormItem>
                            <FormItem prop="certificateNum" label="证书编号" style="width: 50%;">
                                <Input v-model="form.certificateNum" size="large" placeholder="请输入证书编号"/>
                            </FormItem>
                            <FormItem prop="award" label="发证机构" style="width: 50%;">
                                <Input v-model="form.award" size="large" placeholder="请输入发证机构"/>
                            </FormItem>
                            <FormItem prop="awardTime" label="发证时间" >
                                <DatePicker class="dateRight" v-model="form.awardTime" type="date" placeholder="发证时间" @on-change="dataChange1"
                                    value-format="yyyy-MM-dd" format="yyyy-MM-dd" style="width: 228px"></DatePicker>
                            </FormItem>
                            <FormItem prop="validity" label="证书有效期" >
                                <DatePicker class="dateRight" v-model="form.validity" type="date" placeholder="证书有效期" @on-change="dataChange2"
                                    value-format="yyyy-MM-dd" format="yyyy-MM-dd" style="width: 228px"></DatePicker>
                            </FormItem>
                            <FormItem label="">
                                <Checkbox v-model="agree">我已阅读并同意</Checkbox>
                                <router-link :to="{name:'xieyicommon',query:{typeCode:'zsdngjsm', backUrl: 'addzhengshu'}}" class="desc">《证书登记说明》</router-link>
                            </FormItem>
                        </Form>
                        <Button style="background-color: #9C7649;margin-left: 86px;" type="primary" class="save" v-on:click="addUserCertificate()">保存并返回</Button>
                    </div>
                </div>
            </TabPane>
            <!--<TabPane label="学分银行证书" name="name3">标签三的内容</TabPane>-->
        </Tabs>
        <span v-if="certificateList.length < 1">
            <nodata tip="暂时还没有证书~"></nodata>
        </span>
        <!-- 说明model -->
        <Modal v-model="modal" width="400" class-name="vertical-center-modal">
            <p slot="header" class="header">技能等级证书及继续教育说明</p>
            <div class="notice" v-html="examinationDetail">
                {{examinationDetail}}
            </div>
            <div slot="footer" style="text-align: center">
                <a href="javascript:;" v-on:click="showService()" class="read">我已阅读 {{timeSent}}</a>
            </div>
        </Modal>
        <!-- 认定声明 -->
        <Modal v-model="statement" width="400" class-name="vertical-center-modal">
            <p slot="header" class="header">认定声明</p>
            <div class="notice" v-html="statementInfo">
                {{statementInfo}}
            </div>
            <div slot="footer" style="text-align: center">
                <a href="javascript:;" v-on:click="addStatement()" class="read">报名认定考试</a>
            </div>
        </Modal>
        <!-- 转换证明审核失败原因model -->
        <Modal v-model="changeResult" width="400" class-name="vertical-center-modal">
            <p slot="header" class="header">查看原因</p>
            <div class="notice">
                {{changeFailResult}}
            </div>
            <div slot="footer" style="text-align: center">
                <a href="javascript:;" v-on:click="seeResult()" class="read">确定</a>
            </div>
        </Modal>
        <!-- 缴费弹窗 -->
        <Modal v-model="modal1" width="400" class-name="vertical-center-modal">
            <p slot="header" class="header">缴费学习</p>
            <ul class="notice">
                <li><span>学习周期：</span>{{studyConfig.studyStartTime}} 至 {{studyConfig.studyEndTime}}</li>
                <li><span>证书延期：</span>{{studyConfig.awardTime}}</li>
                <li><span>学时要求：</span>{{studyConfig.targetPeriod}}学时</li>
                <li><span>学费费用：</span>{{studyConfig.registrationFee}}元</li>
            </ul>
            <div class="notice">根据国家证书要求，获得证书继续教育学时，延续证书有效期！</div>
            <div slot="footer" style="text-align: center">
                <a href="javascript:;" class="read" @click="payContinu()">缴费学习</a>
            </div>
        </Modal>
        <!-- 申请转换model -->
        <Modal v-model="changeApply" width="400" class-name="vertical-center-modal">
            <p slot="header" class="header">{{certificateName}}</p>
            <ul class="notice">
                <li v-for="(item, index) in scoreList"><span>{{index + 1}}.{{item.name}}：</span>{{item.score}}学分</li>
            </ul>
            <div slot="footer" style="text-align: center">
                <a href="javascript:;" class="read" v-on:click="applyChange()">取消</a>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <a href="javascript:;" class="read" @click="subApplyChange()">申请转换</a>
            </div>
        </Modal>
    </div>
</template>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less" rel="stylesheet/less">
    .orders{
        position: relative;
    }
    .list{
        background-color: #fff;
        padding:40px 15px 0;
        text-align: left;
        .list_item{
            padding: 30px 25px 15px;
            box-shadow: 0px 0px 10px #ececec;
            border-radius: 10px;
            float: left;
            margin-bottom: 40px;
            width: 360px;
            height: 225px;
            &:nth-child(2n+1){
                margin-right: 40px;
            }
            .titles{
                font-size: 16px;
                color: #000;
                img{
                    vertical-align: middle;
                    margin-right: 5px;
                }
            }
            .clearfix{
                border-bottom: 1px dashed #DBDBDB;
                margin-bottom: 15px;
            }
            ul{
                margin: 10px 0 15px;
                li{
                    font-size: 12px;
                    color: #666;
                    line-height: 25px;
                    span{
                        color: #000;
                    }
                }
            }
            .btn{
                text-align: right;
                a{
                    display: inline-block;
                    width: 100px;
                    height: 36px;
                    line-height: 36px;
                    border-radius: 5px;
                    font-size: 14px;
                    text-align: center;
                    border:1px solid #B2936B;
                    color: #B2936B;
                    /*&:first-child{*/
                    /*border:1px solid #999;*/
                    /*color: #999;*/
                    /*margin-right: 50px;*/
                    /*}*/

                }
                .pull-left,.pull-left1{
                    color: #666;
                    font-size: 14px;
                    margin-top: 8px;
                    span{
                        color: #000;
                    }
                    .recuse{
                        border:none;
                        color: #0066CC;
                        width: auto;
                        height: auto;
                        line-height: normal;
                    }
                }
                .pull-left1{
                    text-align: left;
                    margin-top: 0;
                }
                .look{
                    border:none;
                    width: 105px;
                }
            }
        }
    }
    .question{
        position: absolute;
        right: 0;
        top:10px;
        font-size: 16px;
        color: #666;
        z-index: 999;
        img{
            vertical-align: bottom;
        }
    }
    .header{
        font-size: 22px;
        color: #333;
        text-align: center;
        font-weight: 700;
        height: 30px;
        line-height: 30px;
    }
    .notice{
        font-size: 14px;
        color: #666;
        line-height: 25px;
        span{
            color: #000;
        }
    }
    .read{
        background-color: #B2936B;
        color: #fff;
        display: inline-block;
        width: 150px;
        height: 50px;
        line-height: 50px;
        text-align: center;
        border-radius: 5px;
        font-size: 18px;
    }
    .success{
        .logo{
            text-align: center;
            font-size: 16px;
            color: #000;
            width: 660px;
            margin: auto;
            padding: 60px 0 40px;
            border-bottom: 1px dashed #ccc;
            p{
                margin-top: 20px;
            }

        }
        ul{
            width: 660px;
            margin:40px  auto 0;
            li{
                font-size: 14px;
                color: #666;
                line-height: 25px;
                button{
                    margin-top: 50px;
                    border:1px solid #B2926B;
                    color: #B2926B;
                    font-size: 16px;
                    margin-right: 30px;
                    height: 50px;
                    width: 200px;
                }
                span{
                    color: #000;
                }
            }
        }
    }

</style>
<script type="text/ecmascript-6">
    import centers from '../template/center'
    import nodata from '../template/null'
    import {getHtmlWeb, meCertificate, getcertifiConfig, addcertChange, getexamType, centreInfoWeb, downCertifite, getCertificateTree, addUserCertificate} from '../../http'
    export default {
        components: {
            centers,
            nodata
        },
        name: 'myCertificate',
        props: {},
        data() {
            return {
                studyConfig: {},//继续教育配置
                agree: true,
                examItem: '',
                usercertificateId: '',//当前选中证书id
                certificateName: '',
                timeSent: '(10s)',
                changeFailResult: '',
                certificateList: '',
                statement: false,
                modal: false,
                modal1: false,
                changeApply: false,
                changeResult: false,
                type: 0,
                form: {
                    certificateId: 0,
                    certificateNum: '',
                    award: '',
                    awardTime: '',
                    validity: ''
                },
                formValidate: {
                    certificateId: [{required: true, message: "请选择证书", trigger: "blur"}],
                    certificateNum: [{required: true, message: "证书编号不能为空", trigger: "blur"}],
                    award: [{required: true, message: "请输入颁证机构", trigger: "blur"}],
                    awardTime: [{required: true, message: "请选择颁证时间", trigger: "blur"}],
                    validity: [{required: true, message: "请选择有效期", trigger: "blur"}]
                },
                examinationDetail: '',
                statementInfo: '',
                scoreList: [],
                cerList: []
            };
        },
        methods: {
            initForm(){
                this.form.certificateId = 0
                this.form.certificateNum = ''
                this.form.award = ''
                this.form.awardTime = ''
                this.form.validity = ''
            },
            dataChange1(data1,data2){
                this.form.awardTime = data1;
            },
            dataChange2(data1,data2){
                this.form.validity = data1;
            },
            addUserCertificate() {
                if (!this.agree) {
                    this.$Notice.warning({
                        title: "新增证书提醒",
                        desc: "请勾选同意《证书登记说明》",
                        duration: 3,
                    });
                    return
                }
                this.$refs.form.validate(valid => {
                    if (valid) {
                        addUserCertificate(this.form).then(res => {
                            if (res.code == 200) {
                                this.$Notice.success({
                                    title: '新增证书提醒',
                                    desc: '添加证书成功',
                                    duration: 3,
                                });
                                this.initForm()
                            }else{
                                this.$Notice.warning({
                                    title: '新增证书提醒',
                                    desc: res.info,
                                    duration: 3,
                                });
                            }
                        })
                    }
                })
            },
            getCertificateTree() {
                getCertificateTree().then(res => {
                    console.info(res)
                    if(res.code === 200) {
                        this.cerList = res.data
                    }
                })
            },
            //选项卡转换
            handleTabClick(v){
                console.info(v)
                if(v === 'name1'){
                    if(this.type == 0){
                        return
                    }
                    this.type = 0
                }
                if(v === 'name2'){
                    if(this.type == 1){
                        return
                    }
                    this.certificateList = ''
                    this.type = 1
                }
                if(v === 'name3'){
                    return
                }
                this.getInfo();
            },
            //下载转换证明
            downloadProve(v) {
                window.open(v.changeInfo.convertCertHtml);
            },
            //下载证书
            downloadCertificate(v){
                if(v.applyType == 1){
                    return;
                }
                downCertifite({userCertifiId: v.id}).then(res => {
                    let certificate = res.replace("../", "http://localhost:81/base/")
                    console.info(certificate)
                    this.$router.push({
                        name:'sliderhtml',
                        query:{
                            content: certificate,
                            title: v.certificateName,
                        }
                    })
                })
            },
            //查看转换证明审核失败原因
            seeResult(v){
                if(this.changeResult){
                    this.changeResult = false
                    return
                }
                this.changeResult = true
                this.changeFailResult = v.changeInfo.reason
            },
            //查看考试详情
            seeDetail(){
                this.$router.push({
                    name: "myExamPage",
                })
            },
            //点击申请转换证明转换
            applyChange(v){
                if(this.changeApply){
                    this.changeApply = false
                    return
                }
                let that = this
                this.certificateName = v.certificateName
                this.usercertificateId = v.id
                getcertifiConfig({usercertificateId: v.id}).then(res => {
                    if(res.code === 200) {
                        that.scoreList = new Array()
                        res.data[0].coursemap.forEach(function (eve) {
                            let op = eve.courseScore.split(',')
                            let newData = {'name': op[0], 'score': op[1]}
                            that.scoreList.push(newData)
                        })
                        this.changeApply = true
                    }
                })
            },
            //点击提交申请转换证明
            subApplyChange(){
                let that = this
                addcertChange({usercertifiId: that.usercertificateId}).then(res => {
                    if(res.code === 200) {
                        this.$Notice.success({
                            title: '申请转换证明提醒',
                            desc: '申请已提交，请等待审核!',
                            duration: 3,
                        });
                        that.getInfo()
                    }
                    that.changeApply = false
                })
            },
            //初始化数据
            getInfo(){
                meCertificate({type: this.type}).then(res => {
                    if(res.code === 200) {
                        this.certificateList = res.data.userctList;
                    }
                    console.info(res)
                })
            },
            //说明
            showService(){
                if(this.modal){
                    this.modal = false
                    return
                }
                let that = this
                this.modal = true
                var allTime = 10;
                function timeGo() {
                    allTime -= 1;
                    if (allTime == 0 || allTime < 0) {
                        clearInterval(timer);
                        that.timeSent = ''
                    } else {
                        that.timeSent = '(' + allTime + 's)'
                    }
                }
                var timer = setInterval(timeGo, 1000)
            },
            //报考认定考试
            addStatement(){
                centreInfoWeb().then(res => {
                    if(res.code === 200){
                        this.$router.push({
                            name:'myzhengshubaokao',
                            query: {
                                examName: this.examItem.examName,
                                examId: this.examItem.examId,
                                userId: res.data.id,
                                usercertificateId: this.usercertificateId
                            }
                        })
                    }
                })
            },
            //点击继续教育
            continuEdu(v){
                if(v.isLearn == 0){//不满足时间期限
                    this.$Notice.warning({
                        title: "继续教育提醒提醒",
                        desc: '未满足继续教育时间期限',
                        duration: 3,
                    });
                    return
                }
                if(v.learnCourse == 0){//未购买，展示弹窗
                    this.usercertificateId = v.id
                    this.certificateName = v.certificateName
                    this.studyConfig = v.studyConfig
                    this.studyConfig.awardTime = v.studyConfig.awardTime.substring(0,11)
                    this.modal1 = true
                }else{
                    console.info(v)
                    //跳转继续教育页面
                    this.$router.push({
                        name:'nextjiaoyu',
                        query: {
                            usercertificateId: v.id
                        }
                    })
                }

            },
            //跳转继续教育支付页面
            payContinu(){
                this.$router.push({
                    name:'continuBuy',
                    query: {
                        certificateName: this.certificateName,
                        studyStartTime: this.studyConfig.studyStartTime,
                        studyEndTime: this.studyConfig.studyEndTime,
                        amount: this.studyConfig.registrationFee,
                        usercertificateId: this.usercertificateId
                    }
                })
            },
            //获取说明内容
            getService(){
                getHtmlWeb({type: 'jxjy'}).then(res => {
                    this.examinationDetail = res.data.html.htmlContent;
                })
            },
            //查询证书认定考试说明
            showStatementInfo(v){
                this.usercertificateId = v.id
                if(this.statement){
                    this.statement = false
                    return
                }
                this.statement = true
                let that = this
                getexamType({syscertificateId: v.syscertifiId}).then(res => {
                    that.examItem = res.data[0]
                    console.info(res)
                })
            },
            //获取认定说明内容
            getStatementInfo(){
                getHtmlWeb({type: 'rdsm'}).then(res => {
                    this.statementInfo = res.data.html.htmlContent;
                })
            }
        },
        created() {
            this.getService()
            this.getInfo()
            this.getStatementInfo()
            this.getCertificateTree()
        },
    }
</script>
